package main

import "fmt"

func main() {

	var cities map[string]string
	cities = make(map[string]string, 10)
	cities["no1"] = "北京"
	cities["no2"] = "上海"
	fmt.Println(cities)
	cities["no1"] = "天津"
	fmt.Println(cities)

	delete(cities, "no1")
	fmt.Println(cities)

	val, ok := cities["no1"]
	if ok {
		fmt.Println("有no1这个key，值为", val)
	} else {
		fmt.Println("没有no1这个key")
	}


}